; ModuleID = 'test.bc'
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-linux-gnu"

@.fmt_d = private constant [3 x i8] c"%d\00", align 1 ; <[3 x i8]*> [#uses=1]
@.fmt_s = private constant [3 x i8] c"%s\00", align 1 ; <[3 x i8]*> [#uses=1]
@0 = internal constant [20 x i8] c"Tell me z's value: \00", align 1 ; <[20 x i8]*> [#uses=1]
@1 = internal constant [43 x i8] c"I will tell you what I've done! z is now: \00", align 1 ; <[43 x i8]*> [#uses=1]

declare i32 @printf(i8* nocapture, ...) nounwind

declare i32 @scanf(i8* nocapture, ...) nounwind

define i32 @main(i32 %argc, i8** nocapture %argv) nounwind {
entry:
  %z = alloca i32, align 4                        ; <i32*> [#uses=3]
  store i32 0, i32* %z
  %printf = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([3 x i8]* @.fmt_s, i64 0, i64 0), [20 x i8]* @0) ; <i32> [#uses=0]
  %tmp19 = call i32 (i8*, ...)* @scanf(i8* noalias getelementptr inbounds ([3 x i8]* @.fmt_d, i64 0, i64 0), i32* %z) nounwind ; <i32> [#uses=0]
  %printf11 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([3 x i8]* @.fmt_s, i64 0, i64 0), [43 x i8]* @1) ; <i32> [#uses=0]
  %z12 = load i32* %z                             ; <i32> [#uses=1]
  %printf13 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([3 x i8]* @.fmt_d, i64 0, i64 0), i32 %z12) ; <i32> [#uses=0]
  ret i32 0
}
